package org.NooLab.openNLP.geo;

import java.util.ArrayList;
import java.util.Vector;

import org.NooLab.structures.nlp.PoStagged;



/*
 * this class is accessed through the respective interface;
 * 
 * its purpose is to provide access to the database with geographical names 
 * it is opened once by the main (ling) processor.
 * 
 * if sth found in the data base, then
 * it changes the syntag from NN/NE NKON to NNGEO, NEGEO, NKON.GEO
 * 
 */
public class GeoNameLookup implements GeoNameLookupIntf{
	
	
	public  GeoNameLookup(){
		
	}
	
	
	
	public void determineGeoNames( ArrayList<PoStagged> taggedPoSseries ){

		boolean hb =false ;
		int i;
		PoStagged ptag;
		String syntag ;
		
		for (i=0; i<taggedPoSseries.size();i++){
			
			ptag = taggedPoSseries.get(i);
			syntag = ptag.getSyntacticalTag() ;
			
			if (syntag.startsWith("N")){
				// check whether it is a place, region town ...
				
				hb = false;
				if (hb){
					syntag = syntag+".GEO";
					ptag.setSyntacticalTag(syntag) ;
					taggedPoSseries.set(i, ptag) ;
				}
				
			} // a noun ? or named entity
			
		}// i->
		
		
		i=0;
	}

}
